home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Database Designers / Rational Rose 2000 / Rational Setup.EXE / common / lib / MSWin32-x86 / CORE / dirent.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-01-26  |  1.1 KB  |  50 lines

  1. // dirent.h
  2.  
  3. // djl
  4. // Provide UNIX compatibility
  5.  
  6. #ifndef  _INC_DIRENT
  7. #define  _INC_DIRENT
  8.  
  9. //
  10. // NT versions of readdir(), etc
  11. // From the MSDOS implementation
  12. //
  13.  
  14. // Directory entry size 
  15. #ifdef DIRSIZ
  16. #undef DIRSIZ
  17. #endif
  18. #define DIRSIZ(rp)  (sizeof(struct direct))
  19.  
  20. // needed to compile directory stuff
  21. #define DIRENT direct
  22.  
  23. // structure of a directory entry
  24. typedef struct direct 
  25. {
  26.     long    d_ino;            // inode number (not used by MS-DOS) 
  27.     int    d_namlen;        // Name length 
  28.     char    d_name[257];        // file name 
  29. } _DIRECT;
  30.  
  31. // structure for dir operations 
  32. typedef struct _dir_struc
  33. {
  34.     char    *start;            // Starting position
  35.     char    *curr;            // Current position
  36.     long    size;            // Size of string table
  37.     long    nfiles;            // number if filenames in table
  38.     struct direct dirstr;        // Directory structure to return
  39. } DIR;
  40.  
  41. DIR *        win32_opendir(char *filename);
  42. struct direct *    win32_readdir(DIR *dirp);
  43. long        win32_telldir(DIR *dirp);
  44. void        win32_seekdir(DIR *dirp,long loc);
  45. void        win32_rewinddir(DIR *dirp);
  46. int        win32_closedir(DIR *dirp);
  47.  
  48.  
  49. #endif //_INC_DIRENT
  50.